<template>
	<view class="home">
		<view class="erimg">
			<image :src="wechat_view.qrcode" show-menu-by-longpress="true"></image>
			<view class="erimgtxt">请先关注公众号</view>
		</view>
		<view class="ts">
			<view><image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//tsone.png"></image></view>
			<view><image src="https://qiniu.jxyutuo.com/yanqin/tabBarimg//tstwo.png"></image></view>
		</view>
	</view>
	
</template>

<script>
import {
		Config
	} from '../../common/Config.js'
	export default {
		data() {
			return {
				wechat_view: [], //公众号信息
			}
		},
		created() {
			
		},
		onShow() {
			let that = this;
			that.get_wechat_view();
		},
		onLoad(option) {
		
		},
		methods: {
			//获取会员所处公众号的信息
			get_wechat_view() {
				let that = this;
				let data = {
					appKey: Config.appkey
				}
				that.$base.request('wechat/view', 'GET', data)
					.then(res => {
						if (res.data.code == 200) {
							var view = res.data.data;
							if (view.logo) {
								view.logo = Config.imgapi + view.logo;
							}
							if (view.qrcode) {
								view.qrcode = Config.imgapi + view.qrcode;
							}
							that.wechat_view = view;
							uni.setStorageSync('wechat_view', view);
						}
					})
					.catch(err => {
			
					})
			},
		}
	}
</script>

<style lang="scss">
	.home{
		width: 100%;
		height: 100%;
		// background: url(https://qiniu.jxyutuo.com/yanqin/tabBarimg//qr_bg.png);
		background-size: 100% 100%;
		background-position: center center;
		background-image: linear-gradient(#6873ED, #529DEF);
		overflow: auto;
		.erimg{
			width: 248upx;
			box-sizing: border-box;
			margin: 0 auto;
			margin-top: 364upx;
			image{
				width: 248upx;
				height: 248upx;
				background: #ffffff;
			}
			.erimgtxt{
				font-size: 32upx;
				font-family: Noto Sans S Chinese Regular, Noto Sans S Chinese Regular-Regular;
				font-weight: 400;
				text-align: center;
				color: #ffffff;
				margin-top: 22upx;
			}
		}
		.ts{
			width: 237upx;
			margin: 0 auto;
			margin-top: 290upx;
			image{
				width: 237upx;
				height: 27upx;
				margin: 20upx auto;
			}
		}
	}
	
</style>
